﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using Model.Miembro;

namespace Interfaces.Cuotas
{
    public partial class ReporteDeudores : System.Web.UI.Page
    {
        string res;
        ClaseMiembro asdf = null;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated)
              FormsAuthentication.RedirectToLoginPage();
            asdf = (ClaseMiembro)Session["ClaseMiembro"];
            if (asdf.cargo == "Tesorera")
            {
                try
                {
                    GridView1.DataSource = (DataBase.Cuotas.BDCuotas.getdeudores());
                    GridView1.DataSourceID = "";
                    GridView1.DataBind();
                    MultiView1.ActiveViewIndex = 0;
                }
                catch (Exception)
                {
                    MultiView1.ActiveViewIndex = 1;
                    throw;
                }
            }
            else
            {
                Label5.Text = "No cuenta con los permisos adecuados";
                MultiView1.ActiveViewIndex = 1;
            }
        }
        protected void Page_PreInit(object sender, EventArgs e)
        {
            if (Session["BuscarMaster"] != null)
            {
                res = (string)Session["BuscarMaster"];
                this.MasterPageFile = res;
            }
        }
    }
}